home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / obero / oberon_lib.lha / oberon-a / source1.lha / source / 3rdParty / ReqTools.mod < prev    next >
Text File  |  1994-07-25  |  23KB  |  815 lines

  1. (*
  2. **  Filename: reqtools.mod
  3. **  Release: 2.0
  4. **
  5. **  Oberon-A interface for reqtools.library.
  6. **
  7. **  (C) Copyright 1991/1992 Nico François
  8. **  All Rights Reserved
  9. **
  10. **  Needs OC >=4.9ß to compile
  11. *)
  12.  
  13. MODULE ReqTools;
  14.  
  15. (*
  16. ** $C- CaseChk       $I- IndexChk  $L+ LongAdr   $N- NilChk
  17. ** $P- PortableCode  $R- RangeChk  $S- StackChk  $T- TypeChk
  18. ** $V- OvflChk       $Z- ZeroVars
  19. *)
  20.  
  21. IMPORT
  22.   SYS := SYSTEM, E := Exec, D := Dos, I := Intuition, GFX := Graphics, UT := Utility;
  23.  
  24. TYPE
  25.   ReqToolsBasePtr* = CPOINTER TO ReqToolsBase;
  26.   ReqToolsBase* = RECORD (E.Library)
  27.     flags-:         E.BSET;
  28.     pad0, pad1, pad2: SHORTINT;
  29.     segList-:       D.BPTR;
  30.     (* The following library bases may be read and used by your program *)
  31.     intuitionBase-: I.IntuitionBasePtr;
  32.     gfxBase-:       GFX.GfxBasePtr;
  33.     dosBase-:       D.DosLibraryPtr;
  34.     (*
  35.        Next two library bases are only (and always) valid on Kickstart 2.0!
  36.        1.3 version of reqtools also initializes these when run on 2.0.
  37.     *)
  38.     gadToolsBase-:  E.LibraryPtr;
  39.     utilityBase-:   E.LibraryPtr;
  40.   END;
  41.  
  42. CONST
  43.   (* types of requesters, for AllocRequestA() *)
  44.   TypeFileReq*       = 0;
  45.   TypeReqInfo*       = 1;
  46.   TypeFontReq*       = 2;
  47.   TypeScreenModeReq* = 3;
  48.  
  49. TYPE
  50.   ReqToolsReqPtr * = CPOINTER TO ReqToolsReq;
  51.   ReqToolsReq * = RECORD END; (* make them compatible *)
  52.  
  53.  
  54. (***********************
  55. *                      *
  56. *    File requester    *
  57. *                      *
  58. ***********************)
  59.  
  60. (* structure _MUST_ be allocated with AllocRequest() *)
  61.  
  62. TYPE
  63.   FileRequesterPtr* = CPOINTER TO FileRequester;
  64.   FileRequester* = RECORD (ReqToolsReq)
  65.     reqPos*:       LONGINT;
  66.     leftOffset*:   INTEGER;
  67.     topOffset*:    INTEGER;
  68.     flags*:        SET;
  69.     (* OBSOLETE IN V38! DON'T USE! *) hook*: UT.HookPtr;
  70.     dir-:          E.STRPTR;     (* READ ONLY! Change with ChangeReqAttrA()! *)
  71.     matchPat-:     E.STRPTR;     (* READ ONLY! Change with ChangeReqAttrA()! *)
  72.     defaultFont*:  GFX.TextFontPtr;
  73.     waitPointer*:  E.APTR;
  74.     (* V38 *)
  75.     lockWindow*:   LONGINT;
  76.     shareIDCMP*:   LONGINT;
  77.     intuiMsgFunc*: UT.HookPtr;
  78.     reserved1*:    INTEGER;
  79.     reserved2*:    INTEGER;
  80.     reserved3*:    INTEGER;
  81.     reqHeight-:    INTEGER;      (* READ ONLY!  Use RTFI_Height tag! *)
  82.     (* Private data follows! HANDS OFF :-) *)
  83.   END;
  84.  
  85. (* returned by FileRequestA() if multiselect is enabled,
  86.    free list with FreeFileList() *)
  87.  
  88.   FileListPtr* = CPOINTER TO FileList;
  89.   FileList* = RECORD
  90.     next*:   FileListPtr;
  91.     strLen*: LONGINT;  (* -1 for directories *)
  92.     name*:   E.STRPTR;
  93.   END;
  94.  
  95. (* RECORDure passed to RTFI_FilterFunc callback hook by
  96.    volume requester (see RTFI_VolumeRequest tag) *)
  97.  
  98.   VolumeEntryPtr* = CPOINTER TO VolumeEntry;
  99.   VolumeEntry* = RECORD
  100.     type*: LONGINT;    (* DLT_DEVICE or DLT_DIRECTORY *)
  101.     name*: E.STRPTR;
  102.   END;
  103.  
  104. (***********************
  105. *                      *
  106. *    Font requester    *
  107. *                      *
  108. ***********************)
  109.  
  110. (* RECORDure _MUST_ be allocated with AllocRequest() *)
  111.  
  112.   FontRequesterPtr* = CPOINTER TO FontRequester;
  113.   FontRequester* = RECORD (ReqToolsReq)
  114.     reqPos*:       LONGINT;
  115.     leftOffset*:   INTEGER;
  116.     topOffset*:    INTEGER;
  117.     flags*:        SET;
  118.     (* OBSOLETE IN V38! DON'T USE! *) hook*: UT.HookPtr;
  119.     attr-:         GFX.TextAttr;    (* READ ONLY! *)
  120.     defaultFont*:  GFX.TextFontPtr;
  121.     waitPointer*: E.APTR;
  122.     (* V38 *)
  123.     lockWindow*:   LONGINT;
  124.     shareIDCMP*:   LONGINT;
  125.     intuiMsgFunc*: UT.HookPtr;
  126.     reserved1*:    INTEGER;
  127.     reserved2*:    INTEGER;
  128.     reserved3*:    INTEGER;
  129.     reqHeight-:    INTEGER;         (* READ ONLY!  Use RTFI_Height tag! *)
  130.     (* Private data follows! HANDS OFF :-) *)
  131.   END;
  132.  
  133.  
  134. (*************************
  135. *                        *
  136. *  ScreenMode requester  *
  137. *                        *
  138. *************************)
  139.  
  140. (* RECORDure _MUST_ be allocated with rtAllocRequest() *)
  141.  
  142.   ScreenModeRequesterPtr = CPOINTER TO ScreenModeRequester;
  143.   ScreenModeRequester = RECORD (ReqToolsReq)
  144.     reqPos*:        LONGINT;
  145.     leftOffset*:    INTEGER;
  146.     topOffset*:     INTEGER;
  147.     flags*:         SET;
  148.     private1*:      LONGINT;
  149.     displayID-:     LONGINT;     (* READ ONLY! *)
  150.     displayWidth-:  INTEGER;     (* READ ONLY! *)
  151.     displayHeight-: INTEGER;     (* READ ONLY! *)
  152.     defaultFont*:   GFX.TextFontPtr;
  153.     waitPointer*:   E.APTR;
  154.     lockWindow*:    LONGINT;
  155.     shareIDCMP*:    LONGINT;
  156.     intuiMsgFunc*:  UT.HookPtr;
  157.     reserved1*:     INTEGER;
  158.     reserved2*:     INTEGER;
  159.     reserved3*:     INTEGER;
  160.     reqHeight-:     INTEGER;     (* READ ONLY!  Use RTFI_Height tag! *)
  161.     displayDepth*:  INTEGER;
  162.     overscanType*:  INTEGER;
  163.     autoScroll*:    LONGINT;
  164.     (* Private data follows! HANDS OFF :-) *)
  165.   END;
  166.  
  167. (***********************
  168. *                      *
  169. *    Requester Info    *
  170. *                      *
  171. ***********************)
  172.  
  173.   (* for EZRequestA(), GetLongA(), GetStringA() and PaletteRequestA(),
  174.    _MUST_ be allocated with AllocRequest() *)
  175.  
  176.   ReqInfoPtr* = CPOINTER TO ReqInfo;
  177.   ReqInfo* = RECORD (ReqToolsReq)
  178.     reqPos*:      LONGINT;
  179.     leftOffset*:  INTEGER;
  180.     topOffset*:   INTEGER;
  181.     width*:       LONGINT;         (* not for EZRequestA() *)
  182.     reqTitle*:    E.STRPTR;        (* currently only for EZRequestA() *)
  183.     flags*:       SET;
  184.     defaultFont*: GFX.TextFontPtr; (* currently only for PaletteRequestA() *)
  185.     waitPointer*: E.APTR;
  186.     (* V38 *)
  187.     lockWindow:   LONGINT;
  188.     shareIDCMP:   LONGINT;
  189.     intuiMsgFunc: UT.HookPtr;
  190.     (* RECORDure may be extended in future *)
  191.   END;
  192.  
  193. (***********************
  194. *                      *
  195. *     Handler Info     *
  196. *                      *
  197. ***********************)
  198.  
  199. (* for ReqHandlerA(), will be allocated for you when you use
  200.    the ReqHandler tag, never try to allocate this yourself! *)
  201.  
  202.   HandlerInfoPtr* = CPOINTER TO HandlerInfo;
  203.   HandlerInfo* = RECORD
  204.     private1:   LONGINT;
  205.     waitMask*:  SET;
  206.     doNotWait*: E.LONGBOOL; (* ? *)
  207.     (* Private data follows, HANDS OFF :-) *)
  208.   END;
  209.  
  210. (* possible return codes from ReqHandlerA() *)
  211. CONST
  212.   CallHandler* = 080000000H;
  213.  
  214.  
  215. (*************************************
  216. *                                    *
  217. *                TAGS                *
  218. *                                    *
  219. *************************************)
  220.  
  221.   TagBase* = UT.tagUser;
  222.  
  223. (*** tags understood by most requester functions ***)
  224.   (* optional pointer to window *)
  225.   Window*        = TagBase+1;
  226.   
  227.   (* idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) *)
  228.   IDCMPFlags*    = TagBase+2;
  229.   
  230.   (* position of requester window (see below) - default REQPOS_POINTER *)
  231.   ReqPos*        = TagBase+3;
  232.  
  233.   (* signal mask to wait for abort signal *)
  234.   LeftOffset*    = TagBase+4;
  235.  
  236.   (* topedge offset of requester relative to position specified by ReqPos *)
  237.   TopOffset*     = TagBase+5;
  238.  
  239.   (* name of public screen to put requester on (Kickstart 2.0 only!) *)
  240.   PubScrName*    = TagBase+6;
  241.  
  242.   (* address of screen to put requester on *)
  243.   Screen*        = TagBase+7;
  244.   
  245.   (* tagdata must hold the address of (!) an APTR variable *)
  246.   DoReqHandler*  = TagBase+8;
  247.   
  248.   (* font to use when screen font is rejected, _MUST_ be fixed-width font!
  249.      (TextFontPtr , not TextAttrPtr ! - default GfxBase->DefaultFont *)
  250.   DefaultFont*   = TagBase+9;
  251.   
  252.   (* boolean to set the standard wait pointer in window - default FALSE *)
  253.   WaitPointer*   = TagBase+10;
  254.   
  255.   (* (V38) char preceding keyboard shortcut characters (will be underlined) *)
  256.   Underscore*    = TagBase+11;
  257.   
  258.   (* (V38) share IDCMP port with window - default FALSE *)
  259.   ShareIDCMP*    = TagBase+12;
  260.   
  261.   (* (V38) lock window and set standard wait pointer - default FALSE *)
  262.   LockWindowTag* = TagBase+13;
  263.   
  264.   (* (V38) boolean to make requester's screen pop to front - default TRUE *)
  265.   ScreenToFront* = TagBase+14;
  266.   
  267.   (* (V38) Requester should use this font - default: screen font *)
  268.   TextAttr*      = TagBase+15;
  269.   
  270.   (* (V38) call this hook for every IDCMP message not for requester *)
  271.   IntuiMsgFunc*  = TagBase+16;
  272.   
  273.   (* (V38) Locale ReqTools should use for text *)
  274.   Locale*        = TagBase+17;
  275.  
  276. (*** tags specific to EZRequestA ***)
  277.   (* title of requester window - default "Request" or "Information" *)
  278.   ezReqTitle*    = TagBase+20;
  279.   
  280.   (* TagBase+21 reserved *)
  281.   
  282.   (* various flags (see below) *)
  283.   ezFlags*       = TagBase+22;
  284.   
  285.   (* default response (activated by pressing RETURN) - default TRUE *)
  286.   ezDefaultResponse* = TagBase+23;
  287.  
  288. (*** tags specific to GetLongA ***)
  289.   (* minimum allowed value - default MININT *)
  290.   glMin*         = TagBase+30;
  291.   
  292.   (* maximum allowed value - default MAXINT *)
  293.   glMax*         = TagBase+31;
  294.   
  295.   (* suggested width of requester window (in pixels) *)
  296.   glWidth*       = TagBase+32;
  297.   
  298.   (* boolean to show the default value - default TRUE *)
  299.   glShowDefault* = TagBase+33;
  300.   
  301.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  302.   glGadFmt *     = TagBase+34;
  303.   
  304.   (* (V38) optional arguments for RTGL_GadFmt *)
  305.   glGadFmtArgs*  = TagBase+35;
  306.   
  307.   (* (V38) invisible typing - default FALSE *)
  308.   glInvisible*   = TagBase+36;
  309.   
  310.   (* (V38) window backfill - default TRUE *)
  311.   glBackFill*    = TagBase+37;
  312.   
  313.   (* (V38) optional text above gadget *)
  314.   glTextFmt*     = TagBase+38;
  315.   
  316.   (* (V38) optional arguments for RTGS_TextFmt *)
  317.   glTextFmtArgs* = TagBase+39;
  318.   
  319.   (* (V38) various flags (see below) *)
  320.   glFlags*       = ezFlags;
  321.  
  322. (*** tags specfic to GetStringA ***)
  323.   (* suggested width of requester window (in pixels) *)
  324.   gsWidth*       = glWidth;
  325.  
  326.   (* allow empty string to be accepted - default FALSE *)
  327.   gsAllowEmpty*  = TagBase+80;
  328.   
  329.   (* (V38) string with possible responses - default " _Ok |_Cancel" *)
  330.   gsGadFmt *     = glGadFmt;
  331.   
  332.   (* (V38) optional arguments for RTGS_GadFmt *)
  333.   gsGadFmtArgs*  = glGadFmtArgs;
  334.   
  335.   (* (V38) invisible typing - default FALSE *)
  336.   gsInvisible*   = glInvisible;
  337.   
  338.   (* (V38) window backfill - default TRUE *)
  339.   gsBackFill*    = glBackFill;
  340.  
  341.   (* (V38) optional text above gadget *)
  342.   gsTextFmt*     = glTextFmt;
  343.  
  344.   (* (V38) optional arguments for RTGS_TextFmt *)
  345.   gsTextFmtArgs* = glTextFmtArgs;
  346.  
  347.   (* (V38) various flags (see below) *)
  348.   gsFlags*       = ezFlags;
  349.  
  350. (*** tags specific to FileRequestA ***)
  351.   (* various flags (see below) *)
  352.   fiFlags*       = TagBase+40;
  353.   
  354.   (* suggested height of file requester *)
  355.   fiHeight*      = TagBase+41;
  356.  
  357.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  358.   fiOkText*      = TagBase+42;
  359.   
  360.   (* (V38) bring up volume requester, tag data holds flags (see below) *)
  361.   fiVolumeRequest* = TagBase+43;
  362.   
  363.   (* (V38) call this hook for every file in the directory *)
  364.   fiFilterFunc*  = TagBase+44;
  365.   
  366.   (* (V38) allow empty file to be accepted - default FALSE *)
  367.   fiAllowEmpty*  = TagBase+45;
  368.  
  369. (*** tags specific to FontRequestA ***)
  370.   (* various flags (see below) *)
  371.   foflags*       = fiFlags;
  372.   
  373.   (* suggested height of font requester *)
  374.   foHeight*      = fiHeight;
  375.   
  376.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  377.   foOkText*      = fiOkText;
  378.   
  379.   (* suggested height of font sample display - default 24 *)
  380.   foSampleHeight* = TagBase+60;
  381.   
  382.   (* minimum height of font displayed *)
  383.   foMinHeight*   = TagBase+61;
  384.   
  385.   (* maximum height of font displayed *)
  386.   foMaxHeight*   = TagBase+62;
  387.   
  388.   (* [TagBase+63 to TagBase+66 used below] *)
  389.   
  390.   (* (V38) call this hook for every font *)
  391.   foFilterFunc*  = fiFilterFunc;
  392.  
  393. (*** (V38) tags for rtScreenModeRequestA ***)
  394.   (* various flags (see below) *)
  395.   scFlags*       = fiFlags;
  396.   
  397.   (* suggested height of screenmode requester *)
  398.   scHeight*      = fiHeight;
  399.   
  400.   (* replacement text for 'Ok' gadget (max 6 chars) *)
  401.   scOkText*      = fiOkText;
  402.   
  403.   (* property flags (see also RTSC_PropertyMask) *)
  404.   scPropertyFlags* = TagBase+90;
  405.   
  406.   (* property mask - default all bits in RTSC_PropertyFlags considered *)
  407.   scPropertyMask* = TagBase+91;
  408.   
  409.   (* minimum display width allowed *)
  410.   scMinWidth*    = TagBase+92;
  411.   
  412.   (* maximum display width allowed *)
  413.   scMaxWidth*    = TagBase+93;
  414.   
  415.   (* minimum display height allowed *)
  416.   scMinHeight*   = TagBase+94;
  417.   
  418.   (* maximum display height allowed *)
  419.   scMaxHeight*   = TagBase+95;
  420.   
  421.   (* minimum display depth allowed *)
  422.   scMinDepth*    = TagBase+96;
  423.   
  424.   (* maximum display depth allowed *)
  425.   scMaxDepth*    = TagBase+97;
  426.   
  427.   (* call this hook for every display mode id *)
  428.   scFilterFunc*  = fiFilterFunc;
  429.  
  430. (*** tags for ChangeReqAttrA ***)
  431.   (* file requester - set directory *)
  432.   fiDir* = TagBase+50;
  433.  
  434.   (* file requester - set wildcard pattern *)
  435.   fiMatchPat*    = TagBase+51;
  436.   
  437.   (* file requester - add a file or directory to the buffer *)
  438.   fiAddEntry*    = TagBase+52;
  439.   
  440.   (* file requester - remove a file or directory from the buffer *)
  441.   fiRemoveEntry* = TagBase+53;
  442.   
  443.   (* font requester - set font name of selected font *)
  444.   foFontName*    = TagBase+63;
  445.   
  446.   (* font requester - set font size *)
  447.   foFontHeight*  = TagBase+64;
  448.  
  449.   (* font requester - set font style *)
  450.   foFontStyle*   = TagBase+65;
  451.  
  452.   (* font requester - set font flags *)
  453.   foFontFlags*   = TagBase+66;
  454.  
  455. (*** tags for ScreenModeRequestA ***)
  456.   (* (V38) screenmode requester - get display attributes from screen *)
  457.   scModeFromScreen* = TagBase+80;
  458.   
  459.   (* (V38) screenmode requester - set display mode id (32-bit extended) *)
  460.   scDisplayID*     = TagBase+81;
  461.   
  462.   (* (V38) screenmode requester - set display width *)
  463.   scDisplayWidth*  = TagBase+82;
  464.  
  465.   (* (V38) screenmode requester - set display height *)
  466.   scDisplayHeight* = TagBase+83;
  467.  
  468.   (* (V38) screenmode requester - set display depth *)
  469.   scDisplayDepth*  = TagBase+84;
  470.   
  471.   (* (V38) screenmode requester - set overscan type, 0 for regular size *)
  472.   scOverscanType*  = TagBase+85;
  473.   
  474.   (* (V38) screenmode requester - set autoscroll *)
  475.   scAutoScroll*    = TagBase+86;
  476.  
  477. (*** tags for PaletteRequestA ***)
  478.   (* initially selected color - default 1 *)
  479.   paColor*       = TagBase+70;
  480.  
  481. (*** tags for ReqHandlerA ***)
  482.   (* end requester by software control, set tagdata to REQ_CANCEL, REQ_OK or
  483.      in case of EZRequest to the return value *)
  484.   rhEndRequest*  = TagBase+60;
  485.  
  486. (*** tags for AllocRequestA ***)
  487.   (* no tags defined yet *)
  488.  
  489.  
  490. (************
  491. * ReqPos    *
  492. ************)
  493.   ReqPosPointer*      = 0;
  494.   ReqPosCenterWin*    = 1;
  495.   ReqPosCenterScr*    = 2;
  496.   ReqPosTopLeftWin*   = 3;
  497.   ReqPosTopLeftScr*   = 4;
  498.  
  499. (******************
  500. * RTRH_EndRequest *
  501. ******************)
  502.   ReqCancel*          = 0;
  503.   ReqOK*              = 1;
  504.  
  505. (***************************************
  506. * flags for RTFI_Flags and RTFO_Flags  *
  507. * or filereq->Flags and fontreq->Flags *
  508. ***************************************)
  509.   fReqNoBuffer*       = 2;
  510.  
  511. (*****************************************
  512. * flags for RTFI_Flags or filereq->Flags *
  513. *****************************************)
  514.   fReqMultiSelect*    = 0;
  515.   fReqSave*           = 1;
  516.   fReqNoFiles*        = 3;
  517.   fReqPatGad*         = 4;
  518.   fReqSelectDirs*     = 12;
  519.  
  520. (*****************************************
  521. * flags for RTFO_Flags or fontreq->Flags *
  522. *****************************************)
  523.   fReqFixedWidth*     = 5;
  524.   fReqColorFonts*     = 6;
  525.   fReqChangePalette*  = 7;
  526.   fReqLeavePalette*   = 8;
  527.   fReqScale*          = 9;
  528.   fReqStyle*          = 10;
  529.  
  530. (*****************************************************
  531. * (V38) flags for RTSC_Flags or screenmodereq->Flags *
  532. *****************************************************)
  533.   scReqSizeGads*      = 13;
  534.   scReqDepthGad*      = 14;
  535.   scReqNonStdModes*   = 15;
  536.   scReqGuiModes*      = 16;
  537.   scReqAutoscrollGad* = 18;
  538.   scReqOverscanGad*   = 19;
  539.  
  540. (*****************************************
  541. * flags for RTEZ_Flags or reqinfo->Flags *
  542. *****************************************)
  543.   ezReqNoReturnKey*   = 0;
  544.   ezReqLamigaQual*    = 1;
  545.   ezReqCenterText*    = 2;
  546.  
  547. (***********************************************
  548. * (V38) flags for RTGL_Flags or reqinfo->Flags *
  549. ***********************************************)
  550.   glReqCenterText*    = ezReqCenterText;
  551.   glReqHighlightText* = 3;
  552.  
  553. (***********************************************
  554. * (V38) flags for RTGS_Flags or reqinfo->Flags *
  555. ***********************************************)
  556.   gsReqCenterText*    = ezReqCenterText;
  557.   gsReqHighlightText* = glReqHighlightText;
  558.  
  559. (*****************************************
  560. * (V38) flags for RTFI_VolumeRequest tag *
  561. *****************************************)
  562.   vReqNoAssigns*      = 0;
  563.   vReqNoDisks*        = 1;
  564.   vReqAllDisks*       = 2;
  565.  
  566. (*
  567.    Following things are obsolete in ReqTools V38.
  568.    Don't use them in new code!
  569. *)
  570.   fReqDoWildFunc*     = 11;
  571.   ReqHookWildFile*    = 0;
  572.   ReqHookWildFont*    = 1;
  573.  
  574.  
  575. CONST
  576.   name* = "reqtools.library";
  577.   libraryMinimum* = 38;
  578.  
  579. VAR
  580.   base*: ReqToolsBasePtr;
  581.  
  582. LIBCALL (base: ReqToolsBasePtr) AllocRequestA*
  583.   ( type[0]: LONGINT;
  584.     tagList[8]: ARRAY OF UT.TagItem )
  585.   : ReqToolsReqPtr;
  586.   -30;
  587. LIBCALL (base: ReqToolsBasePtr) AllocRequest*
  588.   ( type[0]: LONGINT;
  589.     tag1[8]..: UT.Tag )
  590.   : ReqToolsReqPtr;
  591.   -30;
  592. LIBCALL (base: ReqToolsBasePtr) FreeRequest*
  593.   ( req[9]: ReqToolsReqPtr );
  594.   -36;
  595. LIBCALL (base: ReqToolsBasePtr) FreeReqBuffer*
  596.   ( req[9]: ReqToolsReqPtr );
  597.   -42;
  598. LIBCALL (base: ReqToolsBasePtr) ChangeReqAttrA*
  599.   ( req[9]: ReqToolsReqPtr;
  600.     tagList[8]: ARRAY OF UT.TagItem );
  601.   -48;
  602. LIBCALL (base: ReqToolsBasePtr) ChangeReqAttr*
  603.   ( req[9]: ReqToolsReqPtr;
  604.     tag1[8]..: UT.Tag );
  605.   -48;
  606. LIBCALL (base: ReqToolsBasePtr) FileRequestA*
  607.   ( fileReq[9]: FileRequesterPtr;
  608.     VAR fileName[10]: ARRAY OF CHAR;
  609.     title[11]: ARRAY OF CHAR;
  610.     tagList[8]: ARRAY OF UT.TagItem )
  611.   : BOOLEAN;
  612.   -54;
  613. LIBCALL (base: ReqToolsBasePtr) FileRequest*
  614.   ( fileReq[9]: FileRequesterPtr;
  615.     VAR fileName[10]: ARRAY OF CHAR;
  616.     title[11]: ARRAY OF CHAR;
  617.     tag1[8]..: UT.Tag )
  618.   : BOOLEAN;
  619.   -54;
  620. LIBCALL (base: ReqToolsBasePtr) FreeFileList*
  621.   ( fileList[8]: FileListPtr );
  622.   -60;
  623. LIBCALL (base: ReqToolsBasePtr) EZRequestA*
  624.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  625.     reqInfo[11]: ReqInfoPtr;
  626.     argArray[12]: E.APTR;
  627.     tagList[8]: ARRAY OF UT.TagItem )
  628.   : LONGINT;
  629.   -66;
  630. LIBCALL (base: ReqToolsBasePtr) EZRequestTags*
  631.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  632.     reqInfo[11]: ReqInfoPtr;
  633.     argArray[12]: E.APTR;
  634.     tag1[8]..: UT.Tag )
  635.   : LONGINT;
  636.   -66;
  637. LIBCALL (base: ReqToolsBasePtr) EZRequest*
  638.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  639.     reqInfo[11]: ReqInfoPtr;
  640.     tagList[8]: ARRAY OF UT.TagItem;
  641.     argArray[12]..: E.APTR )
  642.   : LONGINT;
  643.   -66;
  644. (* Without result.... *)
  645. LIBCALL (base: ReqToolsBasePtr) VEZRequestA*
  646.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  647.     reqInfo[11]: ReqInfoPtr;
  648.     argArray[12]: E.APTR;
  649.     tagList[8]: ARRAY OF UT.TagItem );
  650.   -66;
  651. LIBCALL (base: ReqToolsBasePtr) VEZRequestTags*
  652.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  653.     reqInfo[11]: ReqInfoPtr;
  654.     argArray[12]: E.APTR;
  655.     tag1[8]..: UT.Tag );
  656.   -66;
  657. LIBCALL (base: ReqToolsBasePtr) VEZRequest*
  658.   ( bodyFmt[9], gadFmt[10]: ARRAY OF CHAR;
  659.     reqInfo[11]: ReqInfoPtr;
  660.     tagList[8]: ARRAY OF UT.TagItem;
  661.     argArray[12]..: E.APTR );
  662.   -66;
  663. LIBCALL (base: ReqToolsBasePtr) GetStringA*
  664.   ( VAR buffer[9]: ARRAY OF CHAR;
  665.     maxChars[0]: LONGINT;
  666.     title[10]: ARRAY OF CHAR;
  667.     reqInfo[11]: ReqInfoPtr;
  668.     tagList[8]: ARRAY OF UT.TagItem )
  669.   : BOOLEAN;
  670.   -72;
  671. LIBCALL (base: ReqToolsBasePtr) GetString*
  672.   ( VAR buffer[9]: ARRAY OF CHAR;
  673.     maxChars[0]: LONGINT;
  674.     title[10]: ARRAY OF CHAR;
  675.     reqInfo[11]: ReqInfoPtr;
  676.     tag1[8]..: UT.Tag )
  677.   : BOOLEAN;
  678.   -72;
  679. LIBCALL (base: ReqToolsBasePtr) GetLongA*
  680.   ( VAR long[9]: LONGINT; title[10]: ARRAY OF CHAR;
  681.     reqInfo[11]: ReqInfoPtr;
  682.     tagList[8]: ARRAY OF UT.TagItem )
  683.   : BOOLEAN;
  684.   -78;
  685. LIBCALL (base: ReqToolsBasePtr) GetLong*
  686.   ( VAR long[9]: LONGINT; title[10]: ARRAY OF CHAR;
  687.     reqInfo[11]: ReqInfoPtr;
  688.     tag1[8]..: UT.Tag )
  689.   : BOOLEAN;
  690.   -78;
  691. LIBCALL (base: ReqToolsBasePtr) FontRequestA*
  692.   ( fontReq[9]: FontRequesterPtr;
  693.     title[11]: ARRAY OF CHAR;
  694.     tagList[8]: ARRAY OF UT.TagItem )
  695.   : BOOLEAN;
  696.   -96;
  697. LIBCALL (base: ReqToolsBasePtr) FontRequest*
  698.   ( fontReq[9]: FontRequesterPtr;
  699.     title[11]: ARRAY OF CHAR;
  700.     tag1[8]..: UT.Tag )
  701.   : BOOLEAN;
  702.   -96;
  703. LIBCALL (base: ReqToolsBasePtr) PaletteRequestA*
  704.   ( title[10]: ARRAY OF CHAR;
  705.     reqInfo[11]: ReqInfoPtr;
  706.     tagList[8]: ARRAY OF UT.TagItem )
  707.   : LONGINT;
  708.   -102;
  709. LIBCALL (base: ReqToolsBasePtr) PaletteRequest*
  710.   ( title[10]: ARRAY OF CHAR;
  711.     reqInfo[11]: ReqInfoPtr;
  712.     tag1[8]..: UT.Tag )
  713.   : LONGINT;
  714.   -102;
  715. LIBCALL (base: ReqToolsBasePtr) ReqHandlerA*
  716.   ( hinfo[9]: HandlerInfoPtr;
  717.     sigs[0]: SET;
  718.     tagList[8]: ARRAY OF UT.TagItem )
  719.   : LONGINT;
  720.   -108;
  721. LIBCALL (base: ReqToolsBasePtr) ReqHandler*
  722.   ( hinfo[9]: HandlerInfoPtr;
  723.     sigs[0]: SET;
  724.     tag1[8]..: UT.Tag)
  725.   : LONGINT;
  726.   -108;
  727. LIBCALL (base: ReqToolsBasePtr) SetWaitPointer*
  728.   ( window[8]: I.WindowPtr );
  729.   -114;
  730. LIBCALL (base: ReqToolsBasePtr) GetVScreenSize*
  731.   ( screen[8]: I.ScreenPtr;
  732.     VAR width[9],height[10]: LONGINT );
  733.   -120;
  734. LIBCALL (base: ReqToolsBasePtr) SetReqPosition*
  735.   ( reqPos[0]: LONGINT;
  736.     VAR nw[8]: I.NewWindow;
  737.     screen[9]: I.ScreenPtr;
  738.     window[10]: I.WindowPtr );
  739.   -126;
  740. LIBCALL (base: ReqToolsBasePtr) Spread*
  741.   ( VAR posArray[8]: ARRAY OF LONGINT;
  742.     sizeArray[9]: ARRAY OF LONGINT;
  743.     totalSize[0], min[1], max[2], num[3]: LONGINT );
  744.   -132;
  745. LIBCALL (base: ReqToolsBasePtr) ScreenToFrontSafely*
  746.   ( screen[8]: I.ScreenPtr );
  747.   -138;
  748.  
  749. (*--- functions in V38 or higher (distributed as Release 2.0) ---*)
  750. LIBCALL (base: ReqToolsBasePtr) ScreenModeRequestA*
  751.   ( screenmodeReq[9]: ScreenModeRequesterPtr;
  752.     title[11]: ARRAY OF CHAR;
  753.     tagList[8]: ARRAY OF UT.TagItem )
  754.   : BOOLEAN;
  755.   -144;
  756. LIBCALL (base: ReqToolsBasePtr) ScreenModeRequest*
  757.   ( screenmodeReq[9]: ScreenModeRequesterPtr;
  758.     title[11]: ARRAY OF CHAR;
  759.     tag1[8]..: UT.Tag )
  760.   : BOOLEAN;
  761.   -144;
  762. LIBCALL (base: ReqToolsBasePtr) CloseWindowSafely*
  763.   ( window[8]: I.WindowPtr );
  764.   -150;
  765. LIBCALL (base: ReqToolsBasePtr) LockWindow*
  766.   ( window[8]: I.WindowPtr )
  767.   : LONGINT;
  768.   -156;
  769. LIBCALL (base: ReqToolsBasePtr) UnlockWindow*
  770.   ( window[8]: I.WindowPtr;
  771.     winLock[9]: LONGINT );
  772.   -162;
  773.  
  774.  
  775. PROCEDURE Assert* (cond: BOOLEAN; msg: ARRAY OF CHAR);
  776. BEGIN
  777.   IF ~cond THEN
  778.     base.VEZRequestTags
  779.       ( msg, "Abort", NIL, NIL,
  780.         ezReqTitle, SYS.ADR ("Assert"),
  781.         UT.tagDone );
  782.     HALT (20)
  783.   END;
  784. END Assert;
  785.  
  786. (*-- Library Base variable --------------------------------------------*)
  787.  
  788. (* $L- Address globals through A4 *)
  789.  
  790. (*-----------------------------------*)
  791. PROCEDURE* CloseLib;
  792.  
  793. BEGIN
  794.   IF base # NIL THEN E.base.CloseLibrary (base) END;
  795. END CloseLib;
  796.  
  797. (*-----------------------------------*)
  798. PROCEDURE OpenLib * (mustOpen : BOOLEAN);
  799.  
  800. BEGIN
  801.   IF base = NIL THEN
  802.     base :=
  803.       SYS.VAL
  804.         ( ReqToolsBasePtr,
  805.           E.base.OpenLibrary (name, libraryMinimum));
  806.     IF base # NIL THEN SYS.SETCLEANUP (CloseLib)
  807.     ELSIF mustOpen THEN HALT (100)
  808.     END
  809.   END
  810. END OpenLib;
  811.  
  812. BEGIN
  813.   base := NIL
  814. END ReqTools.
  815.